#ifndef EARTHQUAKE_GLOBAL_H
#define EARTHQUAKE_GLOBAL_H

#include <QtGlobal>

#define QSTR(s) QString::fromStdString(s)

const int EXA_VERSION =
               100; // versione del programma 1.0.0
const quint32 EXA_MN_1_0_0_BIN_SLS =
        0xA0000A01; // file binario per stati limite sismici
const quint32 EXA_MN_1_0_0_BIN_SLM =
        0xA0000A02; // file binario per capisaldi sismici
const quint32 EXA_MN_1_0_0_BIN_SPD =
        0xA0000A03; // file binario per spettri elastici
const quint32 EXA_MN_1_0_0_BIN_SDD =
        0xA0000A04; // file binario per spettri di progetto
const quint32 EXA_MN_1_0_0_BIN_STG =
        0xA0000A05; // file binario per stratigrafia
const quint32 EXA_MN_1_0_0_BIN_TPG =
        0xA0000A06; // file binario per topografia
const quint32 EXA_MN_1_0_0_BIN_SPE =
        0xA0100A07; // file binario per disegno spettri
const quint32 EXA_MN_1_0_0_BIN_PRJ =
        0xA0100A08; // file binario per il progetto
const quint32 EXA_MN_1_0_0_BIN_PRL =
        0xA0100A09; // file binario per la lista dei progetti
const quint32 EXA_MN_1_0_0_BIN_PFL =
        0xA0100A10; // file binario per la lista dei file del progetto
const quint32 EXA_MN_1_0_0_BIN_OSD =
        0xA0100A11; // file binario per output disegno spettri
const quint32 EXA_MN_ERR_OBJ =
        0xBADF00D1; // errore per l'oggetto
const quint32 EXA_MN_ERR_FORMAT =
        0xBADF00D2; // errore per il formato
const quint32 EXA_MN_ERR_VERSION =
        0xBADF00D3; // errore per la versione


enum ExaTabRef
            {
                        EXA_TAB_NULL = 0,
                EXA_TAB_TEMPIRITORNO = 1,
                   EXA_TAB_SPECPARAM = 2,
                  EXA_TAB_SPECDESIGN = 3,
                  EXA_TAB_SESMICSITE = 4,
                    EXA_TAB_FILELIST = 5
            };

enum ExaFileErr
            {
                      EXA_FILE_ERR_OK =  0,
                 EXA_FILE_ERR_UNKNOWN =  1,
                  EXA_FILE_ERR_RECENT =  2,
                EXA_FILE_ERR_READONLY =  3,
               EXA_FILE_ERR_WRITEONLY =  4,
                 EXA_FILE_ERR_GENERIC =  5,
              EXA_FILE_ERR_MN_UNKNOWN =  6,
                  EXA_FILE_ERR_MN_OBJ =  7,
               EXA_FILE_ERR_MN_FORMAT =  8,
              EXA_FILE_ERR_MN_VERSION =  9,
            EXA_FILE_ERR_DOESNTEXISTS = 10
            };

enum ExaFileOpenMode
            {
                  EXA_FILE_OM_READ_ONLY = 1,
                 EXA_FILE_OM_WRITE_ONLY = 2
            };

enum  ExaTextFormat
            {
                EXA_TEXT_FORMAT_UNKNOWN = 0,
                EXA_TEXT_FORMAT_HTML    = 1,
                EXA_TEXT_FORMAT_KML     = 2,
                EXA_TEXT_FORMAT_PLAIN   = 3
            };

enum  ExaFileFormat
            {
                EXA_FILE_FORMAT_CURRENT = -1,
                EXA_FILE_FORMAT_UNKNOWN =  0,
                EXA_FILE_FORMAT_BINARY  =  1,
                EXA_FILE_FORMAT_TEXT    =  2
            };

enum  ExaVersion
            {
                EXA_VER_CURRENT =   -1,
                EXA_VER_1_0_0   =  100
            };

enum  ExaFileObj
            {
                EXA_FILE_OBJ_TEMPIRITORNOL    =  0,
                EXA_FILE_OBJ_SPECPARAML       =  1,
                EXA_FILE_OBJ_SPECDESIGNL      =  2,
                EXA_FILE_OBJ_SEISMICLANDMARKS =  3,
                EXA_FILE_OBJ_STRATIGRAPHY     =  4,
                EXA_FILE_OBJ_TOPOGRAPHY       =  5,
                EXA_FILE_OBJ_DATCAPISALDI     =  6,
                EXA_FILE_OBJ_DATPROGETTO      =  7,
                EXA_FILE_OBJ_PROJECTLISTMODEL =  8,
                EXA_FILE_OBJ_PFILELIST        =  9,
                EXA_FILE_OBJ_OUTCAPISALDI     = 10
            };

enum  ExaModuleObj
            {
                EXA_MODULE_OBJ_UNKNOWN          = -1,
                EXA_MODULE_OBJ_DAT_CAPISALDI    =  0,
                EXA_MODULE_OBJ_OUT_SPECTRUM     =  1,
                EXA_MODULE_OBJ_DAT_SEC_CONCRETE =  2,
                EXA_MODULE_OBJ_OUT_SEC_CONCRETE =  3,
                EXA_MODULE_OBJ_DAT_SEC_STEEL    =  4,
                EXA_MODULE_OBJ_OUT_SEC_STEEL    =  5,
                EXA_MODULE_OBJ_DAT_SEC_TIMBER   =  6,
                EXA_MODULE_OBJ_OUT_SEC_TIMBER   =  7
            };

enum ExaModuleErr
            {
                 EXA_MODULE_ERR_OK              = 0,
                 EXA_MODULE_ERR_UNKNOWN         = 1, // Errore modulo sconosciuto
                 EXA_MODULE_ERR_NOTINSTALLED    = 2, // Dichiarato e non installato
                 EXA_MODULE_FILE_ERR_UNKNOWN    = 11,
                 EXA_MODULE_FILE_ERR_RECENT     = 12,
                 EXA_MODULE_FILE_ERR_READONLY   = 13,
                 EXA_MODULE_FILE_ERR_WRITEONLY  = 14,
                 EXA_MODULE_FILE_ERR_GENERIC    = 15,
                 EXA_MODULE_FILE_ERR_MN_UNKNOWN = 16,
                 EXA_MODULE_FILE_ERR_MN_OBJ     = 17,
                 EXA_MODULE_FILE_ERR_MN_FORMAT  = 18,
                 EXA_MODULE_FILE_ERR_MN_VERSION = 19,
                 EXA_MODULE_ERR_SAVING_ALL      = 21,
                 EXA_MODULE_ERR_OPEN_ALL        = 22,
                 EXA_MODULE_ERR_REFCURRENT      = 31,  // Un riferimento non corrente
                 EXA_MODULE_ERR_REFUNKNOWN      = 32  // Un riferimento mancante
            };

#endif // EARTHQUAKE_GLOBAL_H
